#ifndef _USER_CONFIG_OP_H__ 
#define _USER_CONFIG_OP_H__

#include <interface/data_op/user_config.h>

namespace aot{ namespace data{

class user_config_impl : public aot::data::iuser_config
{
public:
    user_config_impl(void):use_sys_cfg_db_(false){;};
    virtual ~user_config_impl(void) {;};
public:   
    virtual void use_sys_cfg_db(bool is_sys_cfg);
    virtual bool read_value(const char* key, aot::tt::istr** value, const char* default);
    virtual bool write_value(const char* key, const char* value);
    
    virtual int read_int(const char* key, int null_value);
    virtual double read_float(const char* key, double null_value);
   
    virtual bool write_int(const char* key, int null_value);
    virtual bool write_float(const char* key, double value);
    
    virtual bool update_db(); 
protected:
    aot::data::isqlite3_db* get_db();
protected:
    bool use_sys_cfg_db_;
};

}} /* end namespace aot/data*/

#endif // _USER_CONFIG_OP_H__
